#include <stdio.h>
#include <string.h>
int main()

{
	int i = 0;
	int count = 0;
	int n;
	int ret = 0;
	int x = 1;
	int a[10] ={0};
	int left,right;
	scanf("%d",&n);
	while(n > 0)
	{
		a[count++]=n % 10;
		n /= 10;	
	}
	left = 0;
	right = count - 1;
	for(i = 0;i < count;i++)
	{
		if(a[left+i] == a[right-i])
		{x = 1;}
		else
		{
		  x = 0;
		  break;
		}
	}
	if(x == 1)
	{
		for(i = 0;i < count;i++)
		{
			ret += a[i];
		}
		printf("%d",ret);
	}
	else
	{
		printf("no");
	}
	return 0;
}
